Static Source Code Analysis using OCL
نویسندگان
چکیده
The majority of artifacts created during software development are representations of programs in textual syntax. Although graphical descriptions are becoming more widespread, source code is still indispensable. To obtain programs that behave correctly and adhere to given coding conventions, source code must be analyzed — preferably using automated tools. Building source code analyzers has a long tradition and various mature tools exist to check code written in conventional languages, such as Java or C. As new languages emerge (e.g., Domain Specific Languages) these tools can not be applied and building a tool for each language does not seem feasible either. This paper investigates how meta models for textual languages and the Object Constraint Language can enable generic static source code analysis for arbitrary languages. The presented approach is evaluated using three languages (Java, SQL and a DSL for state machines).
منابع مشابه
A Library-Based Approach to Translating OCL Constraints to JML Assertions for Runtime Checking
OCL is a formal notation to specify constraints on UML models that cannot otherwise be expressed by diagrammatic notations such as class diagrams. Using OCL one can document detailed design decisions and choices along with the behavior, e.g., class invariants and method pre and postconditions. However, OCL constraints cannot be directly executed and checked at runtime by an implementation, thus...
متن کاملImplementing an OCL Compiler for .NET
Model-Driven Architecture standardized by OMG facilitates separating the platform-independent part (PIM) and the platform-specific part (PSM) of a system model. The platform-independent artifacts are mainly UML models created with CASE tools. Due to this separation, PIM specified by the developers can be reused across several implementation platforms of the software. PSM is ideally generated au...
متن کاملOn Static and Dynamic Analysis of UML and OCL Transformation Models
This contribution discusses model transformations in the form of transformation models that connect a source and a target metamodel. The transformation model is statically analyzed within a UML and OCL tool by giving each constraint an individual representation in the underlying class diagram by highlighting the employed model elements. We also discuss how to analyze transformation models dynam...
متن کاملA Case of Industrial vs. Open-source OCL: Not So Different After All
When studying model-driven engineering (MDE) in industry, generalization of studies is often hard, as most artifacts are proprietary and confidential in nature. A possible solution would be to study open-source artifacts. However, open-source artifacts are not necessarily representative for those found in the industry. As the first step towards investigating the viability of opensource MDE arti...
متن کاملSugar for OCL
Examples of OCL use often do not exceed a few lines. Larger examples are rare, because the concrete syntax of OCL is verbose and based exclusively on ASCII encoding. This makes it easy to edit OCL in any environment, but hard to layout in a readable manner. A minor issue like presentation affects use in a major way. This paper proposes three shorthand notations, or syntactic sugars, for laying ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- ECEASST
دوره 15 شماره
صفحات -
تاریخ انتشار 2008